home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / il / ilHwConnection.z / ilHwConnection
Encoding:
Text File  |  2002-10-03  |  19.3 KB  |  529 lines

  1.  
  2.  
  3.  
  4. iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn - X server connection
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      This is a base class
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <il/ilHwConnection.h>
  16.  
  17.  
  18. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      ilHwConnection manages IL's private server connections, it is essentially
  20.      a cache of shadow connections (to avoid redundant Display's) and also
  21.      maintains a list of OpenGL contexts that have been created on each
  22.      connection.
  23.  
  24.      The ilHwConnection also provides information on each display's
  25.      capabilities (including whether or not OpenGL is supported and what
  26.      operations are really done in hardware).
  27.  
  28.      Provision is also made for creation and caching of X colormaps for use
  29.      with various visuals on each connection.
  30.  
  31. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  32.      AAAAllllllllooooccccaaaattttiiiioooonnnn aaaannnndddd ffffrrrreeeeeeeeiiiinnnngggg
  33.  
  34.           static ilHwConnection* alloc(Display* dpy=NULL)
  35.           static ilHwConnection* getLocal()
  36.           void free()
  37.  
  38.      GGGGeeeetttt////sssseeeetttt mmmmeeeetttthhhhooooddddssss
  39.  
  40.           int getID()
  41.           Display* getDisplay()
  42.           void getScreenSize(iflXYint& size)
  43.           int getCapability()
  44.           int hasCapability(int cap)
  45.           int getExtension()
  46.           int hasExtension(int ext)
  47.           int getSupportedTypes()
  48.           int getSupportedOrders()
  49.           int supportsType(iflDataType type)
  50.           int supportsOrder(iflOrder order)
  51.           int isDirect()
  52.           Colormap getDefaultColormap(VisualID id)
  53.           ilFrameBufferImg* getDummyFbImg()
  54.           int findVisualByAttr(ilHwVisual& vis, int attr=0, int minSize=1,
  55.                                int maxSize = 0)
  56.           int findVisualByID(ilHwVisual& vis, VisualID visualid)
  57.           ilHwRenderer getRenderer()
  58.           int getConvolveMaxWidth()
  59.           int getConvolveMaxHeight()
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))
  71.  
  72.  
  73.  
  74.           int getSepConvolveMaxWidth()
  75.           int getSepConvolveMaxHeight()
  76.           int getLutMaxSize()
  77.           int getFilter4Size()
  78.           void getTexCapacity(ilHwTexCapacity& capacity, GLenum target,
  79.                               GLenum fmt, GLenum resamp)
  80.           void setRenderingStyle(ilRenderingStyle style)
  81.           ilRenderingStyle getRenderingStyle()
  82.  
  83.  
  84.  
  85. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  86.      aaaalllllllloooocccc(((())))
  87.  
  88.           static ilHwConnection* alloc(Display* dpy=NULL)
  89.  
  90.  
  91.           The static method looks up (and possibly allocates) an
  92.           ilHwConnection that matches the Display* given by _d_p_y.  It
  93.           increments a reference count that will be decremented by the ffffrrrreeeeeeee()
  94.           method.
  95.  
  96.      ffffiiiinnnnddddCCCCoooonnnntttteeeexxxxtttt(((())))
  97.  
  98.           ilHwContext* findContext(VisualID id)
  99.  
  100.  
  101.           This method locates an ilHwContext that will work with the VisualID
  102.           indicated by _i_d.
  103.  
  104.      ffffiiiinnnnddddVVVViiiissssuuuuaaaallllBBBByyyyAAAAttttttttrrrr(((())))
  105.  
  106.           int findVisualByAttr(ilHwVisual& vis, int attr=0, int minSize=1,
  107.                                int maxSize = 0)
  108.  
  109.  
  110.           This method fills in an ilHwVisual, _v_i_s, based on attributes
  111.           specified in _a_t_t_r (see the enumerated type ilHwVisualAttributes in
  112.           <il/ilHwConnection.h>), _m_i_n_S_i_z_e (minimum component size) and _m_a_x_S_i_z_e
  113.           (maximum component size).
  114.  
  115.           The double-buffer, stereo and rgb attributes are just suggestions,
  116.           not absolute requirments, if no visual is found with those
  117.           attributes a lesser visual will be returned. The remaining
  118.           attributes imply absolute requirements, no lesser visual will be
  119.           returned.  The visual class fields restrict which visual classes
  120.           will be considered, and are also absolute requirements.
  121.  
  122.      ffffiiiinnnnddddVVVViiiissssuuuuaaaallllBBBByyyyIIIIDDDD(((())))
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))
  137.  
  138.  
  139.  
  140.           int findVisualByID(ilHwVisual& vis, VisualID visualid)
  141.  
  142.  
  143.           This method fills in an ilHwVisual, _v_i_s, that matches the VisualID
  144.           indicated by _v_i_s_u_a_l_i_d.
  145.  
  146.      ffffrrrreeeeeeee(((())))
  147.  
  148.           void free()
  149.  
  150.  
  151.           The method decrements the reference count on this ilHwConnection.
  152.           After calling this method the connection should be considered
  153.           destroyed (although it will be cached if there are still active
  154.           references).
  155.  
  156.      ggggeeeettttCCCCaaaappppaaaabbbbiiiilllliiiittttyyyy(((())))
  157.  
  158.           int getCapability()
  159.  
  160.  
  161.           This methods returns the rendering capabilities of this connection
  162.           as defined by ilHwCapability in <il/ilHwConnection.h>.
  163.  
  164.      ggggeeeettttCCCCoooonnnnvvvvoooollllvvvveeeeMMMMaaaaxxxxHHHHeeeeiiiigggghhhhtttt(((())))
  165.  
  166.           int getConvolveMaxHeight()
  167.  
  168.  
  169.           If the server supports the OpenGL convolution extension, then this
  170.           method returns the maximum height of a general convolution kernel.
  171.           Otherwise, the method returns zero.
  172.  
  173.      ggggeeeettttCCCCoooonnnnvvvvoooollllvvvveeeeMMMMaaaaxxxxWWWWiiiiddddtttthhhh(((())))
  174.  
  175.           int getConvolveMaxWidth()
  176.  
  177.  
  178.           If the server supports the OpenGL convolution extension, then this
  179.           method returns the maximum width of a general convolution kernel.
  180.           Otherwise, the method returns zero.
  181.  
  182.      ggggeeeettttDDDDeeeeffffaaaauuuullllttttCCCCoooolllloooorrrrmmmmaaaapppp(((())))
  183.  
  184.           Colormap getDefaultColormap(VisualID id)
  185.  
  186.  
  187.           This method returns a colormap suitable for use with the visual
  188.           indicated by _i_d.  The colormaps thus allocated are cached on this
  189.           connection.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))
  203.  
  204.  
  205.  
  206.      ggggeeeettttDDDDiiiissssppppllllaaaayyyy(((())))
  207.  
  208.           Display* getDisplay()
  209.  
  210.  
  211.           Returns the internal Display* for this connection;
  212.  
  213.      ggggeeeettttDDDDuuuummmmmmmmyyyyFFFFbbbbIIIImmmmgggg(((())))
  214.  
  215.           ilFrameBufferImg* getDummyFbImg()
  216.  
  217.  
  218.           The IL maintains a dummy window that is used to perform accelerated
  219.           statistics operations when no images are being displayed.  The
  220.           window is unmapped and zero-sized.  This method returns the
  221.           ilFrameBufferImg associated with this window.
  222.  
  223.      ggggeeeettttEEEExxxxtttteeeennnnssssiiiioooonnnn(((())))
  224.  
  225.           int getExtension()
  226.  
  227.  
  228.           Query the OpenGL extensions supported by this connection.  The
  229.           extensions are encoded in a bit mask.  The bits are defined in the
  230.           ilHwExtension enum in <il/ilHwConnection.h>.
  231.  
  232.      ggggeeeettttFFFFiiiilllltttteeeerrrr4444SSSSiiiizzzzeeee(((())))
  233.  
  234.           int getFilter4Size()
  235.  
  236.  
  237.           This method returns the size of the bicubic resampling filter
  238.           expected by this connection.  (This value has meaning only if the
  239.           server supports the OpenGL "filter4" extension.)
  240.  
  241.      ggggeeeettttIIIIDDDD(((())))
  242.  
  243.           int getID()
  244.  
  245.  
  246.           This method returns an unique internal ID for this connection.  This
  247.           is not intended for external use.
  248.  
  249.      ggggeeeettttLLLLooooccccaaaallll(((())))
  250.  
  251.           static ilHwConnection* getLocal()
  252.  
  253.  
  254.           This static method is a specialized version of the aaaalllllllloooocccc() method
  255.           that returns a connection to the local server (useful for
  256.           accelerated operations that will not be directly displayed).
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))
  269.  
  270.  
  271.  
  272.      ggggeeeettttLLLLuuuuttttMMMMaaaaxxxxSSSSiiiizzzzeeee(((())))
  273.  
  274.           int getLutMaxSize()
  275.  
  276.  
  277.           This method returns the maximum size of a color table accepted by
  278.           this connection.
  279.  
  280.      ggggeeeettttRRRReeeennnnddddeeeerrrreeeerrrr(((())))
  281.  
  282.           ilHwRenderer getRenderer()
  283.  
  284.  
  285.           Returns the type of graphics device associated with this connection.
  286.           The result can be one of the following enums:
  287.  
  288.           enum ilHwRenderer {
  289.               ilHwRendIR,             // InfiniteReality
  290.               ilHwRendRE,             // RealityEngine
  291.               ilHwRendImpact,         // Impact
  292.               ilHwRendNewport,        // Newport Graphics (Indy/Indigo2)
  293.               ilHwRendIndigo,         // Indigo Entry, Indy[XL], XS, XZ, Elan, Extreme
  294.               ilHwRendCrime,          // O2
  295.               ilHwRendOther           // Unknown
  296.           };
  297.  
  298.  
  299.      ggggeeeettttRRRReeeennnnddddeeeerrrriiiinnnnggggSSSSttttyyyylllleeee(((())))
  300.  
  301.           ilRenderingStyle getRenderingStyle()
  302.  
  303.  
  304.           Returns the default rendering style of either _i_l_O_p_e_n_G_L_R_e_n_d_e_r_i_n_g
  305.           (default if OpenGL available) or _i_l_X_R_e_n_d_e_r_i_n_g for this connection.
  306.  
  307.      ggggeeeettttSSSSccccrrrreeeeeeeennnnSSSSiiiizzzzeeee(((())))
  308.  
  309.           void getScreenSize(iflXYint& size)
  310.  
  311.  
  312.           Returns the screen resolution (in pixels).
  313.  
  314.      ggggeeeettttSSSSeeeeppppCCCCoooonnnnvvvvoooollllvvvveeeeMMMMaaaaxxxxHHHHeeeeiiiigggghhhhtttt(((())))
  315.  
  316.           int getSepConvolveMaxHeight()
  317.  
  318.  
  319.           If the server supports the OpenGL convolution extension, then this
  320.           method returns the maximum height of a seperable convolution kernel.
  321.           Otherwise, the method returns zero.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))
  335.  
  336.  
  337.  
  338.      ggggeeeettttSSSSeeeeppppCCCCoooonnnnvvvvoooollllvvvveeeeMMMMaaaaxxxxWWWWiiiiddddtttthhhh(((())))
  339.  
  340.           int getSepConvolveMaxWidth()
  341.  
  342.  
  343.           If the server supports the OpenGL convolution extension, then this
  344.           method returns the maximum width of a seperable convolution kernel.
  345.           Otherwise, the method returns zero.
  346.  
  347.      ggggeeeettttSSSSuuuuppppppppoooorrrrtttteeeeddddOOOOrrrrddddeeeerrrrssss(((())))
  348.  
  349.           int getSupportedOrders()
  350.  
  351.  
  352.           This method returns a logical OR of the supported dimension orders
  353.           (as defined by iflOrder) that OpenGL transfers on this connection
  354.           can use.
  355.  
  356.      ggggeeeettttSSSSuuuuppppppppoooorrrrtttteeeeddddTTTTyyyyppppeeeessss(((())))
  357.  
  358.           int getSupportedTypes()
  359.  
  360.  
  361.           This method returns a logical OR of the supported data types (as
  362.           defined by iflDataType) that OpenGL transfers on this connection can
  363.           use.
  364.  
  365.      ggggeeeettttTTTTeeeexxxxCCCCaaaappppaaaacccciiiittttyyyy(((())))
  366.  
  367.           void getTexCapacity(ilHwTexCapacity& capacity, GLenum target,
  368.                               GLenum fmt, GLenum resamp)
  369.  
  370.  
  371.           This method returns the texture capacity of the server.  The result
  372.           is a function of the texture target, format and resampling type.
  373.           Currently, the target can be only _G_L__T_E_X_T_U_R_E__2_D.  The result is
  374.           returned in the ilHwTexCapacity class:
  375.  
  376.           class ilHwTexCapacity {
  377.           public:
  378.               ilHwTexCapacity() : limit(0, 0, 0) { texels = 0; }
  379.  
  380.               iflXYZint limit; // log_2 of the maximum texture size in each dimension
  381.               int texels;      // the maximum area (volume) of a texture
  382.               int units;       // the number of allocation units (banks)
  383.           };
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))
  401.  
  402.  
  403.  
  404.      hhhhaaaassssCCCCaaaappppaaaabbbbiiiilllliiiittttyyyy(((())))
  405.  
  406.           int hasCapability(int cap)
  407.  
  408.  
  409.           This methods tests for the presence of certain rendering
  410.           capabilities, specified by _c_a_p, on this connection.  The possible
  411.           values are defined by ilHwCapability in <il/ilHwConnection.h>.
  412.  
  413.      hhhhaaaassssEEEExxxxtttteeeennnnssssiiiioooonnnn(((())))
  414.  
  415.           int hasExtension(int ext)
  416.  
  417.  
  418.           Queries the connection for a particular extension by testing the bit
  419.           fields returned by ggggeeeettttEEEExxxxtttteeeennnnssssiiiioooonnnn().  See ggggeeeettttEEEExxxxtttteeeennnnssssiiiioooonnnn().
  420.  
  421.      iiiissssDDDDiiiirrrreeeecccctttt(((())))
  422.  
  423.           int isDirect()
  424.  
  425.  
  426.           Returns TRUE if this connection supports direct OpenGL contexts.
  427.  
  428.      sssseeeettttRRRReeeennnnddddeeeerrrriiiinnnnggggSSSSttttyyyylllleeee(((())))
  429.  
  430.           void setRenderingStyle(ilRenderingStyle style)
  431.  
  432.  
  433.           Sets the default rendering style to either _i_l_O_p_e_n_G_L_R_e_n_d_e_r_i_n_g or
  434.           _i_l_X_R_e_n_d_e_r_i_n_g for this connection.
  435.  
  436.      ssssuuuuppppppppoooorrrrttttssssOOOOrrrrddddeeeerrrr(((())))
  437.  
  438.           int supportsOrder(iflOrder order)
  439.  
  440.  
  441.           This method returns true if the specified dimension order, _o_r_d_e_r,
  442.           (as defined by iflOrder) is supported for OpenGL transfers on this
  443.           connection.
  444.  
  445.      ssssuuuuppppppppoooorrrrttttssssTTTTyyyyppppeeee(((())))
  446.  
  447.           int supportsType(iflDataType type)
  448.  
  449.  
  450.           This method returns true if the specified data type, _t_y_p_e, (as
  451.           defined by iflDataType) is supported for OpenGL transfers on this
  452.           connection.
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))  IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll  iiiillllHHHHwwwwCCCCoooonnnnnnnneeeeccccttttiiiioooonnnn((((3333))))
  467.  
  468.  
  469.  
  470. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  471.      ilHwContext(3), ilHwVisual(3), <il/ilHwConnection.h>
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.